package com.ykh.mybbsdemo.service;

import com.ykh.mybbsdemo.vo.Result;
import com.ykh.mybbsdemo.vo.params.ArticleParam;
import com.ykh.mybbsdemo.vo.params.PageParams;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-08-29
 * Time: 20:54
 */
public interface ArticleService {
    /**
     * 分页查询文章列表
     * @param pageParams
     * @return
     */
    //显示首页的文章列表
    Result listArticle(PageParams pageParams);

    //查找最热文章
    Result hotArticle(int limit);

    //查找最新文章
    Result newArticles(int limit);

    //文章归档
    Result listArchives();

    //查看文章详情
    Result findArticleById(long articleId);

    //发布文章
    Result publish(ArticleParam articleParam);
}
